package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.GxInterfaceMapper;
import com.ruoyi.system.domain.GxInterface;
import com.ruoyi.system.service.IGxInterfaceService;

/**
 * 接口Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-07-11
 */
@Service
public class GxInterfaceServiceImpl implements IGxInterfaceService 
{
    @Autowired
    private GxInterfaceMapper gxInterfaceMapper;

    /**
     * 查询接口
     * 
     * @param id 接口主键
     * @return 接口
     */
    @Override
    public GxInterface selectGxInterfaceById(Long id)
    {
        return gxInterfaceMapper.selectGxInterfaceById(id);
    }

    /**
     * 查询接口列表
     * 
     * @param gxInterface 接口
     * @return 接口
     */
    @Override
    public List<GxInterface> selectGxInterfaceList(GxInterface gxInterface)
    {
        return gxInterfaceMapper.selectGxInterfaceList(gxInterface);
    }

    /**
     * 新增接口
     * 
     * @param gxInterface 接口
     * @return 结果
     */
    @Override
    public int insertGxInterface(GxInterface gxInterface)
    {
        gxInterface.setCreateTime(DateUtils.getNowDate());
        return gxInterfaceMapper.insertGxInterface(gxInterface);
    }

    /**
     * 修改接口
     * 
     * @param gxInterface 接口
     * @return 结果
     */
    @Override
    public int updateGxInterface(GxInterface gxInterface)
    {
        return gxInterfaceMapper.updateGxInterface(gxInterface);
    }

    /**
     * 批量删除接口
     * 
     * @param ids 需要删除的接口主键
     * @return 结果
     */
    @Override
    public int deleteGxInterfaceByIds(Long[] ids)
    {
        return gxInterfaceMapper.deleteGxInterfaceByIds(ids);
    }

    /**
     * 删除接口信息
     * 
     * @param id 接口主键
     * @return 结果
     */
    @Override
    public int deleteGxInterfaceById(Long id)
    {
        return gxInterfaceMapper.deleteGxInterfaceById(id);
    }
}
